//2009/08/27 00:34:56
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class AverageCandyLifetime
{
public:
    double getAverage(vector <int> eatenCandies)
    {
		int a[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 ,31};
		int num = 0;
		int total = 0;
		int date = 0;
		for(int i=0; i<12; i++)
		{
			date += a[i];
			num += eatenCandies[i];
			total += eatenCandies[i] * date;
		}
		return 1.0 * total / num;
    }
};
